package com.itheima;

public class TestInter {
    public static void main(String[] args) {
    Inter i=new Inter(){

             @Override
             public void method1() {
                 System.out.println("我是匿名内部类的method1方法");
             }

        @Override
        public void method2() {
            System.out.println("我是匿名内部类的method2方法");
        }
    };
    i.method1();
    i.method2();
    }

}
interface Inter{
    void method1();
    void method2();
}